package com.gopay.scheduler.shedulerx.rdb;



import com.gopay.scheduler.shedulerx.SchedulerOperateFactory;
import org.slf4j.Logger;

import javax.sql.DataSource;

/**
 * @author 19371
 */
public class RdbConfigConstants {

    protected static final String GOPAY_JOB_CONFIG = "gopay_job_config";

    protected  static final String SCHEDULER_CRASH_RECORD = "scheduler_crash_record";

    protected static final String SCHEDULER_EVENT_RECORD = "scheduler_event_record";

    protected static final String SCHEDULER_MISFIRE_RECORD = "scheduler_misfire_record";

    protected  static final String SCHEDULER_OPERATE_RECORD = "scheduler_operate_record";

    protected void errorLog(Logger logger,String description, String var,Exception e){
        logger.error(String.format(description,var),e);
    }

    protected DataSource dataSource () {
        return SchedulerOperateFactory.getFactory().getDataSource();
    }
}
